meson.build: Pull in fallback for PangoFT2 only when needed
authorChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 29 Mar 2019 08:47:31 +0000 (16:47 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 29 Mar 2019 08:50:35 +0000 (16:50 +0800)
On some systems PangoFT2 is optional, so we only use the fallback when
it is being required.

meson.build

index 7319640b103e5486b525e431bc834f13a329b01c..4d6201b50c214d3c35286033e45d76b0cf997f79 100644 (file)
@@ -331,8 +331,7 @@ fribidi_dep    = dependency('fribidi', version: fribidi_req,
 
 # Require PangoFT2 if on X11 or wayland
 require_pangoft2 = wayland_enabled or x11_enabled
-pangoft_dep    = dependency('pangoft2', required: require_pangoft2,
-                            fallback : ['pango', 'libpangoft2_dep'])
+pangoft_dep    = dependency('pangoft2', required: false)
 
 if pangoft_dep.found()
   # Need at least 2.7.1 for FT_Get_Var_Design_Coordinates()
@@ -361,6 +360,10 @@ if pangoft_dep.found()
   endif
 endif
 
+if require_pangoft2
+  pangoft_dep    = dependency('pangoft2', fallback : ['pango', 'libpangoft2_dep'])
+endif
+
 if win32_enabled
   # for GTK_IM_CONTEXT_IME
   pangowin32_dep  = dependency('pangowin32')